Optimal. Leaf size=46 \[ \frac{\tanh ^{-1}(\sin (c+d x))}{a^3 d}-\frac{4 \tan (c+d x)}{a^2 d (a \sec (c+d x)+a)}+\frac{x}{a^3} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.140903, antiderivative size = 48, normalized size of antiderivative = 1.04, number of steps used = 12, number of rules used = 9, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.429, Rules used = {3888, 3886, 3473, 8, 2606, 3767, 2621, 321, 207} \[ \frac{4 \cot (c+d x)}{a^3 d}-\frac{4 \csc (c+d x)}{a^3 d}+\frac{\tanh ^{-1}(\sin (c+d x))}{a^3 d}+\frac{x}{a^3} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3888
Rule 3886
Rule 3473
Rule 8
Rule 2606
Rule 3767
Rule 2621
Rule 321
Rule 207
Rubi steps
\begin{align*} \int \frac{\tan ^4(c+d x)}{(a+a \sec (c+d x))^3} \, dx &=\frac{\int \cot ^2(c+d x) (-a+a \sec (c+d x))^3 \, dx}{a^6}\\ &=\frac{\int \left (-a^3 \cot ^2(c+d x)+3 a^3 \cot (c+d x) \csc (c+d x)-3 a^3 \csc ^2(c+d x)+a^3 \csc ^2(c+d x) \sec (c+d x)\right ) \, dx}{a^6}\\ &=-\frac{\int \cot ^2(c+d x) \, dx}{a^3}+\frac{\int \csc ^2(c+d x) \sec (c+d x) \, dx}{a^3}+\frac{3 \int \cot (c+d x) \csc (c+d x) \, dx}{a^3}-\frac{3 \int \csc ^2(c+d x) \, dx}{a^3}\\ &=\frac{\cot (c+d x)}{a^3 d}+\frac{\int 1 \, dx}{a^3}-\frac{\operatorname{Subst}\left (\int \frac{x^2}{-1+x^2} \, dx,x,\csc (c+d x)\right )}{a^3 d}+\frac{3 \operatorname{Subst}(\int 1 \, dx,x,\cot (c+d x))}{a^3 d}-\frac{3 \operatorname{Subst}(\int 1 \, dx,x,\csc (c+d x))}{a^3 d}\\ &=\frac{x}{a^3}+\frac{4 \cot (c+d x)}{a^3 d}-\frac{4 \csc (c+d x)}{a^3 d}-\frac{\operatorname{Subst}\left (\int \frac{1}{-1+x^2} \, dx,x,\csc (c+d x)\right )}{a^3 d}\\ &=\frac{x}{a^3}+\frac{\tanh ^{-1}(\sin (c+d x))}{a^3 d}+\frac{4 \cot (c+d x)}{a^3 d}-\frac{4 \csc (c+d x)}{a^3 d}\\ \end{align*}
Mathematica [B] time = 0.259056, size = 117, normalized size = 2.54 \[ \frac{8 \cos ^5\left (\frac{1}{2} (c+d x)\right ) \sec ^3(c+d x) \left (\cos \left (\frac{1}{2} (c+d x)\right ) \left (-\log \left (\cos \left (\frac{1}{2} (c+d x)\right )-\sin \left (\frac{1}{2} (c+d x)\right )\right )+\log \left (\sin \left (\frac{1}{2} (c+d x)\right )+\cos \left (\frac{1}{2} (c+d x)\right )\right )+d x\right )-4 \sec \left (\frac{c}{2}\right ) \sin \left (\frac{d x}{2}\right )\right )}{a^3 d (\sec (c+d x)+1)^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.082, size = 76, normalized size = 1.7 \begin{align*} -4\,{\frac{\tan \left ( 1/2\,dx+c/2 \right ) }{d{a}^{3}}}+2\,{\frac{\arctan \left ( \tan \left ( 1/2\,dx+c/2 \right ) \right ) }{d{a}^{3}}}+{\frac{1}{d{a}^{3}}\ln \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) +1 \right ) }-{\frac{1}{d{a}^{3}}\ln \left ( \tan \left ({\frac{dx}{2}}+{\frac{c}{2}} \right ) -1 \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.70578, size = 132, normalized size = 2.87 \begin{align*} \frac{\frac{2 \, \arctan \left (\frac{\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{3}} + \frac{\log \left (\frac{\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a^{3}} - \frac{\log \left (\frac{\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a^{3}} - \frac{4 \, \sin \left (d x + c\right )}{a^{3}{\left (\cos \left (d x + c\right ) + 1\right )}}}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.15144, size = 225, normalized size = 4.89 \begin{align*} \frac{2 \, d x \cos \left (d x + c\right ) + 2 \, d x +{\left (\cos \left (d x + c\right ) + 1\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) -{\left (\cos \left (d x + c\right ) + 1\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 8 \, \sin \left (d x + c\right )}{2 \,{\left (a^{3} d \cos \left (d x + c\right ) + a^{3} d\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \frac{\int \frac{\tan ^{4}{\left (c + d x \right )}}{\sec ^{3}{\left (c + d x \right )} + 3 \sec ^{2}{\left (c + d x \right )} + 3 \sec{\left (c + d x \right )} + 1}\, dx}{a^{3}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 2.67768, size = 85, normalized size = 1.85 \begin{align*} \frac{\frac{d x + c}{a^{3}} + \frac{\log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 1 \right |}\right )}{a^{3}} - \frac{\log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 1 \right |}\right )}{a^{3}} - \frac{4 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )}{a^{3}}}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]